<!--
*Author：富行天下团队

 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/Food/Fproductsku.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/Food/Fproductsku.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'product_sku_id',
                    footer: "Foots",
                    cnName: '规格配置',
                    name: 'Fproductsku',
                    url: "/Fproductsku/",
                    sortName: "product_sku_id"
                },
                extend: extend,
                editFormFields: {supplierCode: "","spec_name":""},
                editFormOptions: [
                            [
                              {
                                dataKey: "mall_supplier",
                                data: [],
                                title: "供应商名称",
                                required: true,
                                field: "supplierCode",
                                type: "select",
                              },
                            ],
                [{"title":"规格名","required":true,"field":"spec_name","type":"text"}]],
                searchFormFields: {"spec_name":""},
                searchFormOptions: [[{"title":"规格名","field":"spec_name","type":"text"}]],
                columns: [
                  // {field:'product_sku_id',title:'产品规格id',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                      //  {field:'product_id',title:'产品id',type:'int',width:90,require:true,align:'left',sortable:true},
                      //  {field:'spec_sku_id',title:'产品sku记录索引 (由规格id组成)',type:'string',width:220,require:true,align:'left'},
                      //  {field:'image_id',title:'规格图片id',type:'int',width:90,require:true,align:'left'},
                      //  {field:'product_no',title:'产品编码',type:'string',width:120,require:true,align:'left'},
                      //  {field:'product_price',title:'产品价格',type:'decimal',width:90,require:true,align:'left'},
                      //  {field:'line_price',title:'产品划线价',type:'decimal',width:90,require:true,align:'left'},
                      //  {field:'low_price',title:'产品底价',type:'decimal',width:90,align:'left'},
                      //  {field:'stock_num',title:'当前库存数量',type:'int',width:90,require:true,align:'left'},
                      //  {field:'product_sales',title:'产品销量(废弃)',type:'int',width:90,require:true,align:'left'},
                      //  {field:'product_weight',title:'产品重量(Kg)',type:'decimal',width:90,require:true,align:'left'},
                      //  {field:'supplier_price',title:'供应商价格',type:'decimal',width:90,align:'left'},
                      {field:'supplierCode',title:'供应商',type:'string',width:120,align:'left',bind: {
                        key: "mall_supplier",
                        data: [],
                        },
                      },
                       {field:'spec_name',title:'规格名',type:'string',width:90,align:'left'},
                      //  {field:'cost_price',title:'成本价',type:'decimal',width:90,require:true,align:'left'},
                      //  {field:'is_full',title:'是否次日置满0否1是',type:'int',width:90,require:true,align:'left'},
                      //  {field:'base_stock_num',title:'当前库存数量',type:'int',width:90,require:true,align:'left'},
                      //  {field:'app_id',title:'应用id',type:'int',width:90,require:true,align:'left'},
                      {field:'creator',title:'创建人',type:'string',width:80,align:'left'},
                       {field:'createDate',title:'创建时间',type:'datetime',width:190,align:'left',sortable:true},
                       {field:'modifier',title:'修改人',type:'string',width:80,align:'left'},
                       {field:'modifyDate',title:'修改时间',type:'datetime',width:190,align:'left',sortable:true},

                      //  {field:'merchantCode',title:'商户编码',type:'string',width:220,align:'left'},
                      //  {field:'merchantName',title:'商户名称',type:'string',width:220,align:'left'},
                      ],
                detail: {
                    cnName:"#detailCnName",
                    columns: [],
                    sortName: "",
                    key:""
                }
            };
        }
    };
    export default vueParam;
</script>
